package com.example.fashion.android.home;


import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.Gravity;
import android.widget.LinearLayout;

import com.example.fashion.android.base.BaseActivity.BaseActivity;
import com.example.fashion.android.NewWorkCommunication.activity.IMActivity;
import com.example.fashion.android.globar.Constant;
import com.example.fashion.android.util.LayoutUtil;

/**
 * Created by fashion on 2017/7/13.
 * 网络通讯
 */
public class NetWorkCommunicationActivity extends BaseActivity implements LayoutUtil.ClickCallBack {
    LinearLayout mRootLayout;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //创建一个线性布局
        mRootLayout = LayoutUtil.getLinearLayout(this, LinearLayout.VERTICAL, Gravity.CENTER);
        setContentView(mRootLayout);
    }


    @Override
    protected void clear() {

    }

    @Override
    public void initView() {
        //显示标题栏
        setSystemTitleName("网络通讯");
    }

    @Override
    public void initData() {
        //添加功能列表
        LayoutUtil.addFunctionList(this, mRootLayout, Constant.NETWORK_COMMUNICATION_RESOURCE_ID, this);
    }

    @Override
    public void onClickListener(int tag) {
        switch (tag){
            case 0:     //Http
                break;
            case 1:     //Socket
                break;
            case 2:     //Bluetooth
                break;
            case 3:     //NFC
                break;
            case 4:     //HeadSet
                break;
            case 5:     //USB
                break;
            case 6:     //IM
                startActivity(new Intent(NetWorkCommunicationActivity.this,IMActivity.class));
                break;
            default:
                break;

        }
    }
}
